﻿package control
{
    import com.core.*;
    import consts.*;
    import flash.utils.*;
    import view.*;

    public class NewGuideControl extends Control
    {
        private var alltips:Dictionary;
        private var currentTips:Object;
        private var curdata:Object;

        public function NewGuideControl(param1:Object)
        {
            this.alltips = new Dictionary();
            super(param1);
            return;
        }// end function

        override public function update(param1:Obproxy, param2:ProxyChange) : void
        {
            if (param1.getName() == "newguide")
            {
                if (param2.property == "hide")
                {
                    if (GuideView.getInstance().gid == param2.newvalue || param2.newvalue == 0)
                    {
                        this.target.hide();
                    }
                }
                else if (param2.property == "doguide")
                {
                    if (NewGuideView.getInstance().visible == false)
                    {
                        this.target.doGuide(param2.newvalue);
                    }
                }
                else if (param2.property == "doclick")
                {
                    if (NewGuideView.getInstance().gid == GuideType.GUIDE_RW)
                    {
                        this.target.clickHandler();
                    }
                }
            }
            return;
        }// end function

    }
}
